Save raw json to enable download of large number of records #276
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds a variable (
json_dir
) to the functionapi_request()
andoa_request()
. If set, the raw json files as returned by the call, per page, to OA and no further processing is done.This makes the download of a large number of records possible, which would not have been possible by using the current approach.
In addition, it enables power users to process the json according to their needs, while not visible to the casual user, as this argument is not available in
oa_fetch()
.This ala=so enables an efficient way of doing the conversion into a nibble as demonstrated at https://github.com/rkrug/openalexr_json/blob/b67560708abf711fdc0e5c9b26c2327e12b7cc1b/R/json_to_tibble.R. At https://rkrug.github.io/openalexr_json/README.html you can see a timing comparison.
An additional bonus is, that the json files can be read directly into VOSViewer which makes it possible to link
openalexR
directly to further analysis with VOSViewer.